package top.infopub.dto.cap;

import org.apache.commons.lang3.StringUtils;
import top.infopub.enums.cap.FinancialStyleEnum;
import top.infopub.enums.cap.FinancialTypesEnum;

/*融资方案详情明细*/
public class FinPlanSubDto {
    /** 融资方案子表SGUID */
    private String id;

    /** 项目编码 */
    private String proCode;

    /** 融资主体 */
    private String sgCoopId;

    /** 融资团队负责人 */
    private String leader;

    /** 金融机构ID */
    private String setupFinancialId;

    /** 金融机构名称 */
    private String dockBank;

    /** 金融机构类型 */
    private String capType;

    /** 融资类型 */
    private String loanType;

    /** 融资方案简述 */
    private String financingPlanDesc;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getProCode() {
        return proCode;
    }

    public void setProCode(String proCode) {
        this.proCode = proCode;
    }

    public String getSgCoopId() {
        return sgCoopId;
    }

    public void setSgCoopId(String sgCoopId) {
        this.sgCoopId = sgCoopId;
    }

    public String getLeader() {
        return leader;
    }

    public void setLeader(String leader) {
        this.leader = leader;
    }

    public String getSetupFinancialId() {
        return setupFinancialId;
    }

    public void setSetupFinancialId(String setupFinancialId) {
        this.setupFinancialId = setupFinancialId;
    }

    public String getDockBank() {
        return dockBank;
    }

    public void setDockBank(String dockBank) {
        this.dockBank = dockBank;
    }

    public String getCapType() {
        return capType;
    }

    public void setCapType(String capType) {
        this.capType = capType;
        if (StringUtils.isNotBlank(capType)) {
            FinancialTypesEnum ppdt = FinancialTypesEnum.getByCode(capType);
            if (ppdt != null) {
                setCapType(ppdt.getName());
            }
        }
    }

    public String getLoanType() {
        return loanType;
    }

    public void setLoanType(String loanType) {
        this.loanType = loanType;
        if (StringUtils.isNotBlank(loanType)) {
            FinancialStyleEnum ppdt = FinancialStyleEnum.getByCode(loanType);
            if (ppdt != null) {
                setLoanType(ppdt.getName());
            }
        }
    }

    public String getFinancingPlanDesc() {
        return financingPlanDesc;
    }

    public void setFinancingPlanDesc(String financingPlanDesc) {
        this.financingPlanDesc = financingPlanDesc;
    }
}
